package jsyf.oa.entity.wechat.service_account;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

public class WeChatUserEntity extends BaseEntity {

    /**
     * id
     */
    private String id;
    /**
     * 是否已关注
     */
    private Integer subscribe;
    /**
     * open_id
     */
    private String openid;
    /**
     *  昵称
     */
    private String nickname;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 城市
     */
    private String city;
    /**
     * 国家
     */
    private String country;
    /**
     * 省份
     */
    private String province;
    /**
     * 头像地址
     */
    private String headimgurl;
    /**
     * 最后一次订阅时间
     */
    private String subscribe_time;
    /**
     * union_id
     */
    private String unionid;
    /**
     * 给用户的备注
     */
    private String remark;
    /**
     * 用户分组
     */
    private Integer groupid;
    /**
     * 用户tag
     */
    private String tagid_list;
    /**
     * 客户电话
     */
    private String customerTel;
    /**
     * 销售id
     */
    private String salerId;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getSubscribe() {
        return subscribe;
    }

    public void setSubscribe(Integer subscribe) {
        this.subscribe = subscribe;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    public String getSubscribe_time() {
        return subscribe_time;
    }

    public void setSubscribe_time(String subscribe_time) {
        this.subscribe_time = subscribe_time;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getGroupid() {
        return groupid;
    }

    public void setGroupid(Integer groupid) {
        this.groupid = groupid;
    }

    public String getTagid_list() {
        return tagid_list;
    }

    public void setTagid_list(String tagid_list) {
        this.tagid_list = tagid_list;
    }

    public String getCustomerTel() {
        return customerTel;
    }

    public void setCustomerTel(String customerTel) {
        this.customerTel = customerTel;
    }

    public String getSalerId() {
        return salerId;
    }

    public void setSalerId(String salerId) {
        this.salerId = salerId;
    }

    @Override
    public String getTableName() {
        return "T_WECHAT_SERVICE_USER";
    }

    @Override
    public String getViewName() {
        return "v_wechat_service_user";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID","id");
        json.put("SUBSCRIBE","subscribe");
        json.put("OPEN_ID","openId");
        json.put("NICK_NAME","nickName");
        json.put("SEX","sex");
        json.put("CITY","city");
        json.put("COUNTRY","country");
        json.put("PROVINCE","province");
        json.put("HEAD_IMG_URL","headImgUrl");
        json.put("SUBSCRIBE_TIME","subscribe_time");
        json.put("UNION_ID","unionId");
        json.put("REMARK","remark");
        json.put("GROUP_ID","groupId");
        json.put("TAGID_LIST","tagidList");
        json.put("CUSTOMER_TEL","customerTel");
        json.put("SALER_ID","salerId");
        return json;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID", id);
        json.put("SUBSCRIBE",this.getSubscribe());
        json.put("OPEN_ID",this.getOpenid());
        json.put("NICK_NAME",this.getNickname());
        json.put("SEX",this.getSex());
        json.put("CITY",this.getCity());
        json.put("COUNTRY",this.getCountry());
        json.put("PROVINCE",this.getProvince());
        json.put("HEAD_IMG_URL",this.getHeadimgurl());
        json.put("SUBSCRIBE_TIME",this.getSubscribe_time());
        json.put("UNION_ID",this.getUnionid());
        json.put("REMARK",this.getRemark());
        json.put("GROUP_ID",this.getGroupid());
        json.put("TAGID_LIST",this.getTagid_list());
        json.put("CUSTOMER_TEL",this.getCustomerTel());
        json.put("SALER_ID",this.getSalerId());
        return json;
    }

}